//
//  CLpeopleViewCell.m
//  I-want-go
//
//  Created by dllo on 15/10/23.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "CLpeopleViewCell.h"
#import "CLscreen.h"
@implementation CLpeopleViewCell
- (void)dealloc {
    
    [_nameLabel release];
    [_numberLabel release];
    [_phoImage release];
    [_hotLabel release];
    [super dealloc];
    
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    
    self.nameLabel = [[UILabel alloc] init];
    self.nameLabel.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.nameLabel];
    [_nameLabel release];
    
    self.numberLabel = [[UILabel alloc] init];
    self.numberLabel.backgroundColor = [UIColor whiteColor];
    self.numberLabel.font = [UIFont systemFontOfSize:20];
    [self.contentView addSubview:self.numberLabel];
    [_numberLabel release];
    
    self.hotLabel = [[UILabel alloc] init];
    self.hotLabel.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.hotLabel];
    [_hotLabel release];
    
    self.phoImage = [[UIImageView alloc] init];
    self.phoImage.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.phoImage];
    [_phoImage release];
    
//    UIButton *mybutton = [UIButton buttonWithType:UIButtonTypeSystem];
//    mybutton.frame = CGRectMake(290 * SWIDTH, 30 * SHEIGHT, 75* SWIDTH, 40 * SWIDTH);
//    mybutton.layer.borderWidth = 1;
//    mybutton.layer.cornerRadius = 10;
//    [self.contentView addSubview:mybutton];
//    [mybutton setTitle:@"关注" forState:UIControlStateNormal];
//    [mybutton setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
//    
//    [mybutton addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
//    
    
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.numberLabel.frame = CGRectMake(15 * SWIDTH, 20 * SHEIGHT, 50 * SWIDTH, 60 * SHEIGHT);
    
    self.phoImage.frame = CGRectMake(60 * SWIDTH, 15 * SHEIGHT, 65 * SWIDTH, 70 * SHEIGHT);
    
    self.nameLabel.frame = CGRectMake(130* SWIDTH, 12 * SHEIGHT, 150 * SWIDTH, 40 * SHEIGHT);
    
    self.hotLabel.frame = CGRectMake(130 * SWIDTH, 55 * SHEIGHT, 150 * SWIDTH, 20 * SHEIGHT);
    
    
    
}

//- (void)click:(UIButton *)button {
//    
//}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
